import 'dart:convert' show json;


class BaseBean<T> {

  int Code;
  T Data;
  String Message;

  BaseBean.fromParams({this.Code, this.Data, this.Message});

  factory BaseBean(jsonStr) => jsonStr == null ? null : jsonStr is String ? new BaseBean.fromJson(json.decode(jsonStr)) : new BaseBean.fromJson(jsonStr);

  BaseBean.fromJson(jsonRes) {
    Code = jsonRes['Code'];
    Data = jsonRes['Data'];
    Message = jsonRes['Message'];
  }

  @override
  String toString() {
    return '{"Code": $Code,"Data": ${Data != null?'${json.encode(Data)}':'null'},"Message": ${Message != null?'${json.encode(Message)}':'null'}}';
  }
}
